Rename csched -> sched_credit/sched-credit in control plane.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 27 May 2006 09:13:27 +0000 (10:13 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 27 May 2006 09:13:27 +0000 (10:13 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xc_csched.c
tools/libxc/xenctrl.h
tools/python/xen/lowlevel/xc/xc.c
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/server/SrvDomain.py
tools/python/xen/xm/main.py
xen/include/public/sched_ctl.h

index 18513ec179b033567a46deb10cdc60e94c6de9cf..944529fea0bf1189fb58b088dd14e520ba47e6cc 100644 (file)
 
 
 int
-xc_csched_domain_set(
+xc_sched_credit_domain_set(
     int xc_handle,
     uint32_t domid,
-    struct csched_domain *sdom)
+    struct sched_credit_adjdom *sdom)
 {
     DECLARE_DOM0_OP;
 
@@ -29,10 +29,10 @@ xc_csched_domain_set(
 }
 
 int
-xc_csched_domain_get(
+xc_sched_credit_domain_get(
     int xc_handle,
     uint32_t domid,
-    struct csched_domain *sdom)
+    struct sched_credit_adjdom *sdom)
 {
     DECLARE_DOM0_OP;
     int err;
index 056f9902bc1b00bd00ecc7ad9c5c946260de537f..a5471bc70b8e6141b6ff44e5a48d76224361f24f 100644 (file)
@@ -354,13 +354,13 @@ int xc_sedf_domain_get(int xc_handle,
                        uint64_t *latency, uint16_t *extratime,
                        uint16_t *weight);
 
-int xc_csched_domain_set(int xc_handle,
-                         uint32_t domid,
-                         struct csched_domain *sdom);
+int xc_sched_credit_domain_set(int xc_handle,
+                               uint32_t domid,
+                               struct sched_credit_adjdom *sdom);
 
-int xc_csched_domain_get(int xc_handle,
-                         uint32_t domid,
-                         struct csched_domain *sdom);
+int xc_sched_credit_domain_get(int xc_handle,
+                               uint32_t domid,
+                               struct sched_credit_adjdom *sdom);
 
 typedef evtchn_status_t xc_evtchn_status_t;
 
index a11fd2994b1a0f4d4e7704b729e866406a040167..d85f0f71070312c0ef4a6bae0bea8040395224a8 100644 (file)
@@ -716,16 +716,16 @@ static PyObject *pyxc_sedf_domain_get(XcObject *self, PyObject *args)
                          "weight",    weight);
 }
 
-static PyObject *pyxc_csched_domain_set(XcObject *self,
-                                        PyObject *args,
-                                        PyObject *kwds)
+static PyObject *pyxc_sched_credit_domain_set(XcObject *self,
+                                              PyObject *args,
+                                              PyObject *kwds)
 {
     uint32_t domid;
     uint16_t weight;
     uint16_t cap;
     static char *kwd_list[] = { "dom", "weight", "cap", NULL };
     static char kwd_type[] = "I|HH";
-    struct csched_domain sdom;
+    struct sched_credit_adjdom sdom;
     
     weight = 0;
     cap = (uint16_t)~0U;
@@ -736,22 +736,22 @@ static PyObject *pyxc_csched_domain_set(XcObject *self,
     sdom.weight = weight;
     sdom.cap = cap;
 
-    if ( xc_csched_domain_set(self->xc_handle, domid, &sdom) != 0 )
+    if ( xc_sched_credit_domain_set(self->xc_handle, domid, &sdom) != 0 )
         return PyErr_SetFromErrno(xc_error);
 
     Py_INCREF(zero);
     return zero;
 }
 
-static PyObject *pyxc_csched_domain_get(XcObject *self, PyObject *args)
+static PyObject *pyxc_sched_credit_domain_get(XcObject *self, PyObject *args)
 {
     uint32_t domid;
-    struct csched_domain sdom;
+    struct sched_credit_adjdom sdom;
     
     if( !PyArg_ParseTuple(args, "I", &domid) )
         return NULL;
     
-    if ( xc_csched_domain_get(self->xc_handle, domid, &sdom) != 0 )
+    if ( xc_sched_credit_domain_get(self->xc_handle, domid, &sdom) != 0 )
         return PyErr_SetFromErrno(xc_error);
 
     return Py_BuildValue("{s:H,s:H}",
@@ -1084,8 +1084,8 @@ static PyMethodDef pyxc_methods[] = {
       " latency   [long]: domain's wakeup latency hint\n"
       " extratime [int]:  domain aware of extratime?\n"},
     
-    { "csched_domain_set",
-      (PyCFunction)pyxc_csched_domain_set,
+    { "sched_credit_domain_set",
+      (PyCFunction)pyxc_sched_credit_domain_set,
       METH_KEYWORDS, "\n"
       "Set the scheduling parameters for a domain when running with the\n"
       "SMP credit scheduler.\n"
@@ -1093,8 +1093,8 @@ static PyMethodDef pyxc_methods[] = {
       " weight    [short]: domain's scheduling weight\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
-    { "csched_domain_get",
-      (PyCFunction)pyxc_csched_domain_get,
+    { "sched_credit_domain_get",
+      (PyCFunction)pyxc_sched_credit_domain_get,
       METH_VARARGS, "\n"
       "Get the scheduling parameters for a domain when running with the\n"
       "SMP credit scheduler.\n"
index ea362c6b728fa44f411a6af0abdb187ffce52932..54ef911a917d788133a79335b84bea1dfef51c09 100644 (file)
@@ -522,25 +522,25 @@ class XendDomain:
         except Exception, ex:
             raise XendError(str(ex))
 
-    def domain_csched_get(self, domid):
+    def domain_sched_credit_get(self, domid):
         """Get credit scheduler parameters for a domain.
         """
         dominfo = self.domain_lookup_by_name_or_id_nr(domid)
         if not dominfo:
             raise XendInvalidDomain(str(domid))
         try:
-            return xc.csched_domain_get(dominfo.getDomid())
+            return xc.sched_credit_domain_get(dominfo.getDomid())
         except Exception, ex:
             raise XendError(str(ex))
     
-    def domain_csched_set(self, domid, weight, cap):
+    def domain_sched_credit_set(self, domid, weight, cap):
         """Set credit scheduler parameters for a domain.
         """
         dominfo = self.domain_lookup_by_name_or_id_nr(domid)
         if not dominfo:
             raise XendInvalidDomain(str(domid))
         try:
-            return xc.csched_domain_set(dominfo.getDomid(), weight, cap)
+            return xc.sched_credit_domain_set(dominfo.getDomid(), weight, cap)
         except Exception, ex:
             raise XendError(str(ex))
 
index 133bd9ad3fd3deb31d5def7147097757ca46adcc..95dc57a1d1bd125dc53042cf5722e68479cbe814 100644 (file)
@@ -132,15 +132,15 @@ class SrvDomain(SrvDir):
         val = fn(req.args, {'dom': self.dom.domid})
         return val
     
-    def op_domain_csched_get(self, _, req):
-        fn = FormFn(self.xd.domain_csched_get,
+    def op_domain_sched_credit_get(self, _, req):
+        fn = FormFn(self.xd.domain_sched_credit_get,
                     [['dom', 'int']])
         val = fn(req.args, {'dom': self.dom.domid})
         return val
 
 
-    def op_domain_csched_set(self, _, req):
-        fn = FormFn(self.xd.domain_csched_set,
+    def op_domain_sched_credit_set(self, _, req):
+        fn = FormFn(self.xd.domain_sched_credit_set,
                     [['dom', 'int'],
                      ['weight', 'int']])
         val = fn(req.args, {'dom': self.dom.domid})
index 085a7b49adff25864c1d5bf7604a390f39b95699..e9c430efebc62e211decd58eb8c51bbbea232692 100644 (file)
@@ -99,7 +99,7 @@ sched_sedf_help = "sched-sedf [DOM] [OPTIONS]       Show|Set simple EDF paramete
                                     specifies another way of setting a domain's\n\
                                     cpu period/slice."
 
-csched_help = "csched                           Set or get credit scheduler parameters"
+sched_credit_help = "sched-credit                           Set or get credit scheduler parameters"
 block_attach_help = """block-attach <DomId> <BackDev> <FrontDev> <Mode>
                 [BackDomId]         Create a new virtual block device"""
 block_detach_help = """block-detach  <DomId> <DevId>    Destroy a domain's virtual block device,
@@ -175,7 +175,7 @@ host_commands = [
     ]
 
 scheduler_commands = [
-    "csched",
+    "sched-credit",
     "sched-bvt",
     "sched-bvt-ctxallow",
     "sched-sedf",
@@ -737,11 +737,11 @@ def xm_sched_sedf(args):
         else:
             print_sedf(sedf_info)
 
-def xm_csched(args):
-    usage_msg = """Csched:     Set or get credit scheduler parameters
+def xm_sched_credit(args):
+    usage_msg = """sched-credit:     Set or get credit scheduler parameters
  Usage:
 
-        csched -d domain [-w weight] [-c cap]
+        sched-credit -d domain [-w weight] [-c cap]
     """
     try:
         opts, args = getopt.getopt(args[0:], "d:w:c:",
@@ -769,14 +769,14 @@ def xm_csched(args):
         sys.exit(1)
 
     if weight is None and cap is None:
-        print server.xend.domain.csched_get(domain)
+        print server.xend.domain.sched_credit_get(domain)
     else:
         if weight is None:
             weight = int(0)
         if cap is None:
             cap = int(~0)
 
-        err = server.xend.domain.csched_set(domain, weight, cap)
+        err = server.xend.domain.sched_credit_set(domain, weight, cap)
         if err != 0:
             print err
 
@@ -1076,7 +1076,7 @@ commands = {
     "sched-bvt": xm_sched_bvt,
     "sched-bvt-ctxallow": xm_sched_bvt_ctxallow,
     "sched-sedf": xm_sched_sedf,
-    "csched": xm_csched,
+    "sched-credit": xm_sched_credit,
     # block
     "block-attach": xm_block_attach,
     "block-detach": xm_block_detach,
index cf50dee8bb153eb05b40e3c9f9d2b003ed1b4075..95e50e3c534bb0170f9249486419371ade60d063 100644 (file)
@@ -49,7 +49,7 @@ struct sched_adjdom_cmd {
             uint32_t extratime;
             uint32_t weight;
         } sedf;
-        struct csched_domain {
+        struct sched_credit_adjdom {
             uint16_t weight;
             uint16_t cap;
         } credit;